﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ESAM_Assignment_3
{
    public static class HtmlEnabler
    {
        public static string Enable(string s)
        {
            /* Enabling bold and italics for Server.HtmlEncode()
            s = s.Replace("&lt;b&gt;", "<b>");
            s = s.Replace("&lt;/b&gt;", "</b>");
            s = s.Replace("&lt;i&gt;", "<i>");
            s = s.Replace("&lt;/i&gt;", "</i>");

            s = s.Replace("&lt;B&gt;", "<B>");
            s = s.Replace("&lt;/B&gt;", "</B>");
            s = s.Replace("&lt;I&gt;", "<I>");
            s = s.Replace("&lt;/I&gt;", "</I>");
             */

            s = s.Replace("&#60;b&#62;", "<b>");
            s = s.Replace("&#60;&#47;b&#62;", "</b>");
            s = s.Replace("&#60;i&#62;", "<i>");
            s = s.Replace("&#60;&#47;i&#62;", "</i>");

            s = s.Replace("&#60;B&#62;", "<B>");
            s = s.Replace("&#60;&#47;B&#62;", "</B>");
            s = s.Replace("&#60;I&#62;", "<I>");
            s = s.Replace("&#60;&#47;I&#62;", "</I>");
            
            return s;
        }
    }
}